package service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.UserDao;
import po.User;

@Service("UserService")
@Transactional
public class UserServiceImpl implements UserService {
	
	/**
	 * @author CoinBin
	 */
	
	@Autowired
	private UserDao userDao;

	@Override
	public List<User> serviceSelectAllUser(int page) {
		return userDao.selectAllUser(page);
	}

	@Override
	public int serviceDelUser(int id) {
		return userDao.delUser(id);
	}
	
	@Override
	public List<User> serviceSelectEml(User user) {
		// TODO Auto-generated method stub
		return userDao.selectEml(user);
	}

	@Override
	public int count() {
		// TODO Auto-generated method stub
		return (userDao.count()+4)/5;
	}

}
